The present invention relates to the field of bandwidth management on a network; more particularly, the present invention relates to regulating the rate at which data is transferred between the network and a node on the network.
Today, Internet Service Providers (ISPs) desire an ability to regulate end user bandwidth and network usage. This is particularly significant if an ISP desires to sell various amounts of network bandwidth. Many mechanisms currently exist to provide this functionality. These mechanisms include regulating end user bandwidth at the network protocol stack (e.g., Internet Protocol (IP) level) on a server, at the network protocol stack (e.g., IP level) on the network, and at the application level in the server.
Regulating end user bandwidth at the protocol layer on the server is usually accomplished by using modified IP software or network device driver and packet scheduling modules that perform rule based regulation based on an IP address, a mask and port number. For instance, a server serving web pages may regulate its access as a means of regulating bandwidth. The regulation that is performed is tightly coupled with the protocol stack and cannot manage name based virtual sites easily. Examples include Bitpro, Linux Traffic Shaper, and FreeBSD xe2x80x9cDummy Net.xe2x80x9d
Regulating end user bandwidth at the IP level on the network is usually accomplished by using either a filtering mechanism, or a Quality of Service (QoS) model. A filtering model operates on a gateway or router in a manner much like the host base IP regulation. A set of rules are loaded into the filtering system, and traffic is regulated according to those rules. Again, this system cannot easily manage name based virtual sites (e.g., Virtual Hosts) and this model becomes complicated if multiple routes connecting the end systems exist, since the filtering routers would need to coordinate their activities. The Packet Shaper by Packeteer of Cupertino, Calif. is an example of this type of system.
Also at IP level on the network, the Quality of Service (QoS) mechanism allows precise management of network traffic based on network control information that is used by the routers in the network. A particular connection can be identified, and as messages are transmitted through the network, each router ensures that the connection meets the programmed constraints. This mechanism is effective, but it requires support in each router that processes a message and faces the same virtual site and multiple path problems as the filtering method above. An example of this type of system is the Open Policy System by IP Highway.
In order to perform end user bandwidth management at the application level in an application, each application is designed to implement a limit. That is, an application, such as, for example, an Apache or Netscape server, would need to be modified to regulate their byte flow being output. In this way, an ISP or system administrator is enabled to regulate the data rate being produced. However, such regulation requires substantial modification to all applications (servers) that produce content. Also it is very difficult to apply common limits to two servers. In other words, if one wishes to regulate a particular class of users (e.g., an ISP""s server allowing access by multiple clients), then all the applications would have to be modified to collaborate and share the bandwidth to meet the bandwidth constraint. Maintaining such collaboration on a server is very difficult. Furthermore, because such regulation is run in user mode, it is independent of the underlying scheduling of applications, which is controlled by the operating system. Therefore, any attempt to guarantee a data rate on the application side can be ignored and prevented by the operating system.
What is needed is a way to avoid these problems.
A method and apparatus for managing bandwidth in a network is described. In one embodiment, the method determines whether a request being transferred from a socket layer to a protocol layer in the operating system is subject to one or more bandwidth limits, and limits data to be transmitted to network protocols to only a portion of the data specified by the request if at least one bandwidth limit exists.